const Router = require('koa-router')
const { Success } = require('../../core/http-exception')
const { Auth } = require('../../core/middleware/auth')
const { User } = require('../../models/user')
const router = new Router({
  prefix: '/v1/user',
})
router.get('/getUserInfo', new Auth().m, async (ctx, next) => {
  const userInfo = await User.getUserByUserUserId(ctx.auth.id)
  ctx.body = {
    code: 200,
    data: userInfo,
  }
})
module.exports = router

